/**
 * @see [微信官方文档](https://mp.weixin.qq.com/debug/wxadoc/dev/api/bluetooth.html#wxonblecharacteristicvaluechangecallback)
 */

export default function on_ble_characterisitic_value_change() {
	return new Promise<{
		/**
		 * 蓝牙设备 id，参考 device 对象
		 */
		deviceId: string;
		/**
		 * 特征值所属服务 uuid
		 */
		serviceId: string;
		/**
		 * 特征值 uuid
		 */
		characteristicId: string;
		/**
		 * 特征值最新的值
		 */
		value: ArrayBuffer;
	}>((resolve) => {
		wx.onBLECharacteristicValueChange((res) => {
			resolve(res);
		});
	});
}
